<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
<title><?=$frs['filename']?></title>
<script type="text/javascript" src="<?=$onlyurl?>web-apps/apps/api/documents/api.js"></script>
</head>
<body style="padding:0px;margin:0px;">
<div id="placeholder" style="height:100%;width:100%"></div>
<script>
var config = {
    "document": {
        "fileType": "<?=$frs['fileext']?>",
        "key": "<?=$frs['filekey']?>",
        "title": "<?=$frs['filename']?>",
        "url": "<?=$frs['fileurl']?>",
		"permissions": {
			"changeHistory": true,
            "comment": false,
            "download": false,
            "fillForms": true,
            "print": true,
			'help':false
        },
		"info": {
            "folder": "<?=$frs['filename']?>",
            "owner": "<?=$frs['optname']?>",
            "uploaded": "<?=$frs['adddt']?>"
        }
    },
	"type": "<?=$frs['viewtype']?>",
	"documentType": "<?=$frs['documentType']?>",
	"editorConfig": {
		"mode": "<?=$frs['mode']?>",
		"lang":"zh-CN",
		"location":"zh-CN",
		"user":{
			"name" :"<?=$optrs['name']?>",
			"id" :"<?=$optrs['id']?>"
		},
		"help":false,
		"customization": {
            "chat": false,
			"autosave":false,
            "comments": false,	
			"compactToolbar": false, //显示简单工具栏
			"help":false,
			'about': false,
            'feedback': false,
			"logo": {
                "image": "<?=URL?>images/platlogo.png",
                "imageEmbedded": "<?=URL?>images/platlogo.png",
                "url": "<?=URL?>"
            },
			"customer": {
                "address": "信呼开发团队",
                "info": "信呼开发团队",
                "logo": "<?=URL?>images/logo.png",
                "mail": "admin@rockoa.com",
                "name": "磐石",
                "www": "<?=URLY?>"
            }
		},
		"callbackUrl": "<?=$callbackUrl?>"
	},
	"height": "100%",
	"width": "100%",
	"events": {
        "onDocumentReady":function(){
			//var obj = $('iframe')[0];
			//console.log(obj.src);
			//console.log('red');
			//docEditor.denyEditingRights('这个是个提示');
		}
    }
};
//console.log(config.editorConfig.callbackUrl);
var docEditor = new DocsAPI.DocEditor("placeholder", config);
</script>
</body>
</html>